﻿using System;
using System.Configuration;
using System.Linq;
using Controllers;

namespace Web
{
    public partial class OvertimeInfo : System.Web.UI.Page
    {
        protected ReqOvertime reqOvertime;
        protected string empName;
        protected void Page_Load(object sender, EventArgs e)
        {
            ApolloOaDataContext ctx = new ApolloOaDataContext(ConfigurationManager.ConnectionStrings["SqlConnectionString"].ConnectionString);
            string formNo = Request.QueryString["formNo"];
            reqOvertime = ctx.ReqOvertimes.Single(r => r.FormNo == formNo);
            Employee employee = ctx.Employees.Single(r => r.Id == reqOvertime.EmpId);
            empName = employee.Name;
        }
    }
}